﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Enter.Entity;

namespace Enter.Services.Mail
{
    public partial interface IMail
    {
        #region 用户登录
        /// <summary>
        /// 检查是否为空
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        bool ValidateUser(string userName, string password);
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        T201_UserEntity UserRegister(T201_UserEntity entity);


        /// <summary>
        /// 修改密码
        /// </summary>
        /// <returns></returns>
        bool UpdatePwd(string uID, string uPwd);

        /// <summary>
        /// 根据用户名获取用户信息
        /// </summary>
        /// <param name="uName"></param>
        /// <param name="uPWD"></param>
        /// <returns></returns>
        T201_UserEntity GetUserByName(string uName);
        /// <summary>
        /// 根据用户ID获取用户信息
        /// </summary>
        /// <param name="uName"></param>
        /// <param name="uPWD"></param>
        /// <returns></returns>
        T201_UserEntity GetUserByID(int uID);
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="uName"></param>
        /// <param name="uPWD"></param>
        /// <returns></returns>
        T201_UserEntity UserLogin(string uName, string uPWD);

        /// <summary>
        /// 检查用户名是否可用
        /// </summary>
        /// <param name="userName"></param>
        /// <returns>T 可用 F 不可用</returns>
        bool CheckUserName(string userName);

        /// <summary>
        /// 检查用户名是否可用
        /// </summary>
        /// <param name="userName"></param>
        /// <returns>T 可用 F 不可用</returns>
        bool CheckUserPhone(string userPhone);

        #endregion

        #region 用户基本信息
        bool UpdateUserInfo(T202_UserInfoEntity entity);

        T202_UserInfoEntity GetUserInfo(int uID);

        /// <summary>
        /// 修改用户头像
        /// </summary>
        /// <returns></returns>
        int UpdateUserHead(T202_UserInfoEntity model);

        #endregion

        #region 用户收货地址
        /// <summary>
        /// 添加收货地址
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool SaveUserAddress(T203_UserAddressEntity entity);

      

        /// <summary>
        /// 删除收货地址
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DelUserAddress(int id,int uID);

        /// <summary>
        /// 获取地址内容
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T203_UserAddressEntity GetAddressInfo(int id);

        /// 取消默认地址
        /// </summary>
        /// <returns></returns>
        bool CancelDefalutAdd(int ID);
        /// <summary>
        /// 取消默认地址
        /// </summary>
        /// <param name="uID"></param>
        /// <returns></returns>
        bool CancelDefalutAddbyUID(int uID);

        /// <summary>
        /// 设置为默认地址
        /// </summary>
        /// <returns></returns>
        bool SetDefalutAdd(int ID,int uID);

        /// <summary>
        /// 获取用户收货地址
        /// </summary>
        /// <param name="uID"></param>
        /// <returns></returns>
        List<T203_UserAddressEntity> GetUserAdd(int uID);

        #endregion

        #region 商品收藏
        bool AddGoodCollect(int uID, string shopNO, string gNo);

        /// <summary>
        /// 获取用户收藏
        /// </summary>
        /// <param name="uID"></param>
        /// <returns></returns>
        List<T212_UserGoodCollectionEntity> GetUserGoodColl(int uID, int pageSize, int currentPageIndex, out int totalPages, out int totalCount);

        #endregion

        #region 店铺收藏
        bool AddShopCollect(int uID, int shopID);

        /// <summary>
        /// 获取用户收藏
        /// </summary>
        /// <param name="uID"></param>
        /// <returns></returns>
        List<T211_UserShopCollectionEntity> GetUserShopColl(int uID, int pageSize, int currentPageIndex, out int totalPages, out int totalCount);

        #endregion

#region 商品评论

        /// <summary>
        /// 商品评论
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
         bool AddGoodComment(T205_UserGoodCommentEntity entity);
        
        /// <summary>
        /// 买家对店铺的评论
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
         bool AddTreadComment(T206_UserTradeCommentEntity entity);
      
        /// <summary>
        /// 店铺对买家的评论
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
         bool AddShopComment(T404_ShopTradeCommentEntity entity);
        

         /// <summary>
        /// 根据订单获取评论
        /// </summary>
        /// <param name="OrderID"></param>
        /// <returns></returns>
         T205_UserGoodCommentEntity GetObjectByOrderID(int OrderID, int GID);
       

         /// <summary>
         /// 用户评论
         /// </summary>
         /// <param name="uID"></param>
         /// <param name="entity"></param>
         /// <returns></returns>
         List<T205_UserGoodCommentEntity> GetUserCommnet(int uID, int pageSize, int currentPageIndex, out int totalPages, out int totalCount);
        
        /// <summary>
        /// 某件商品的评论
        /// </summary>
        /// <param name="gID"></param>
        /// <param name="entity"></param>
        /// <returns></returns>
         List<T205_UserGoodCommentEntity> GetGoodCommnet(int gID, int pageSize, int currentPageIndex, out int totalPages, out int totalCount);
       
#endregion

    }
}
